package com.lxp.userms.mapper;

import com.lxp.userms.entity.Favorite;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface FavoriteMapper {
    int insertFavorite(Favorite favorite);
    Favorite selectFavorite(int postId, int userId);
    int deleteFavorite(int postId, int userId);
    int countFavoritesByPostId(int postId);
    Favorite checkFavorite(int postId, int userId);

    // 确保该方法已定义
    void deleteFavoritesByPostId(int postId);
}